CMS 3D CMS Logo

KFBasedPixelFitterProducer.cc
Go to the documentation of this file.
3 
8 
12 
15 
22 
24 public:
25  explicit KFBasedPixelFitterProducer(const edm::ParameterSet& iConfig);
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
29 
30 private:
31  void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
32 
37 };
38 
40  : thePropagatorLabel(iConfig.getParameter<std::string>("propagator")),
41  thePropagatorOppositeLabel(iConfig.getParameter<std::string>("propagator")),
42  theTTRHBuilderName(iConfig.getParameter<std::string>("TTRHBuilder")) {
43  if (iConfig.getParameter<bool>("useBeamSpotConstraint")) {
44  theBeamSpotToken = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamSpotConstraint"));
45  }
46 
47  produces<PixelFitter>();
48 }
49 
52 
53  desc.add<bool>("useBeamSpotConstraint", true);
54  desc.add<edm::InputTag>("beamSpotConstraint", edm::InputTag("offlineBeamSpot"));
55  desc.add<std::string>("propagator", "PropagatorWithMaterial");
56  desc.add<std::string>("propagatorOpposite", "PropagatorWithMaterialOpposite");
57  desc.add<std::string>("TTRHBuilder", "PixelTTRHBuilderWithoutAngle");
58 
59  descriptions.add("kfBasedPixelFitter", desc);
60 }
61 
65 
68 
69  edm::ESHandle<Propagator> opropagator;
71 
74 
76  iSetup.get<IdealMagneticFieldRecord>().get(field);
77 
78  const reco::BeamSpot* beamspot = nullptr;
81  iEvent.getByToken(theBeamSpotToken, hbs);
82  beamspot = hbs.product();
83  }
84 
85  auto impl = std::make_unique<KFBasedPixelFitter>(
86  propagator.product(), opropagator.product(), ttrhb.product(), tracker.product(), field.product(), beamspot);
87  auto prod = std::make_unique<PixelFitter>(std::move(impl));
88  iEvent.put(std::move(prod));
89 }
90 
ConfigurationDescriptions.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::StreamID
Definition: StreamID.h:30
TrackerGeometry.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ESHandle.h
edm::EDGetTokenT< reco::BeamSpot >
TransientRecHitRecord.h
KFBasedPixelFitterProducer::thePropagatorLabel
std::string thePropagatorLabel
Definition: KFBasedPixelFitterProducer.cc:33
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
KFBasedPixelFitterProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: KFBasedPixelFitterProducer.cc:50
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
edm::EDGetTokenT::isUninitialized
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
HLTObjectsMonitor_cfi.beamspot
beamspot
Definition: HLTObjectsMonitor_cfi.py:11
KFBasedPixelFitterProducer::theTTRHBuilderName
std::string theTTRHBuilderName
Definition: KFBasedPixelFitterProducer.cc:35
KFBasedPixelFitterProducer
Definition: KFBasedPixelFitterProducer.cc:23
edm::Handle< reco::BeamSpot >
KFBasedPixelFitterProducer::thePropagatorOppositeLabel
std::string thePropagatorOppositeLabel
Definition: KFBasedPixelFitterProducer.cc:34
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
KFBasedPixelFitterProducer::produce
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition: KFBasedPixelFitterProducer.cc:62
MakerMacros.h
PixelFitter.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
BeamSpot.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:16
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
reco::BeamSpot
Definition: BeamSpot.h:21
IdealMagneticFieldRecord.h
edm::ESHandle< TransientTrackingRecHitBuilder >
KFBasedPixelFitterProducer::theBeamSpotToken
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
Definition: KFBasedPixelFitterProducer.cc:36
beamspot
Definition: BeamSpotWrite2Txt.h:8
ParameterSetDescription.h
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
impl
Definition: trackAlgoPriorityOrder.h:18
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
TrackingComponentsRecord.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
KFBasedPixelFitterProducer::KFBasedPixelFitterProducer
KFBasedPixelFitterProducer(const edm::ParameterSet &iConfig)
Definition: KFBasedPixelFitterProducer.cc:39
KFBasedPixelFitter.h
ParameterSet.h
EDProducer.h
edm::Event
Definition: Event.h:73
KFBasedPixelFitterProducer::~KFBasedPixelFitterProducer
~KFBasedPixelFitterProducer() override
Definition: KFBasedPixelFitterProducer.cc:26
edm::InputTag
Definition: InputTag.h:15
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12