CMS 3D CMS Logo

TICLSeedingRegionProducer.cc
Go to the documentation of this file.
1 // Authors: Felice Pantaleo, Marco Rovere
2 // Emails: felice.pantaleo@cern.ch, marco.rovere@cern.ch
3 // Date: 06/2019
4 
5 #include <vector>
6 
17 #include "SeedingRegionByTracks.h"
18 #include "SeedingRegionGlobal.h"
19 
20 using namespace ticl;
21 
23 public:
26  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
27 
28  void beginRun(edm::Run const& iEvent, edm::EventSetup const& es) override;
29 
30  void produce(edm::Event&, const edm::EventSetup&) override;
31 
32 private:
33  std::unique_ptr<SeedingRegionAlgoBase> myAlgo_;
34  int algoId_;
36 };
38 
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 }
55 
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 > 1. && quality(\"highPurity\") && "
62  "hitPattern().numberOfLostHits(\"MISSING_OUTER_HITS\") < 5");
63  desc.add<std::string>("propagator", "PropagatorWithMaterial");
64  desc.add<int>("algoId", 1);
65  descriptions.add("ticlSeedingRegionProducer", desc);
66 }
67 
68 void TICLSeedingRegionProducer::beginRun(edm::Run const& iEvent, edm::EventSetup const& es) { myAlgo_->initialize(es); }
69 
71  auto result = std::make_unique<std::vector<TICLSeedingRegion>>();
72  myAlgo_->makeRegions(evt, es, *result);
73 
74  evt.put(std::move(result));
75 }
ConfigurationDescriptions.h
MessageLogger.h
SeedingRegionByTracks.h
ESHandle.h
TICLSeedingRegionProducer::algoId_
int algoId_
Definition: TICLSeedingRegionProducer.cc:34
edm::Run
Definition: Run.h:45
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TICLSeedingRegionProducer::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &es) override
Definition: TICLSeedingRegionProducer.cc:68
EDProducer.h
ticl
Definition: Common.h:8
TICLSeedingRegionProducer::TICLSeedingRegionProducer
TICLSeedingRegionProducer(const edm::ParameterSet &)
Definition: TICLSeedingRegionProducer.cc:39
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TICLSeedingRegionProducer::seedingId_
std::string seedingId_
Definition: TICLSeedingRegionProducer.cc:35
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TICLSeedingRegionProducer::myAlgo_
std::unique_ptr< SeedingRegionAlgoBase > myAlgo_
Definition: TICLSeedingRegionProducer.cc:33
TICLSeedingRegionProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TICLSeedingRegionProducer.cc:56
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
TICLSeedingRegionProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: TICLSeedingRegionProducer.cc:70
TICLSeedingRegionProducer::~TICLSeedingRegionProducer
~TICLSeedingRegionProducer() override
Definition: TICLSeedingRegionProducer.cc:25
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
SeedingRegionGlobal.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
SeedingRegionAlgoBase.h
mps_fire.result
result
Definition: mps_fire.py:311
ConsumesCollector.h
TICLSeedingRegionProducer
Definition: TICLSeedingRegionProducer.cc:22
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15