CMS 3D CMS Logo

PixelNtupletsFitterProducer.cc
Go to the documentation of this file.
14 
16 public:
18  : useRiemannFit_(iConfig.getParameter<bool>("useRiemannFit")), idealMagneticFieldToken_(esConsumes()) {
19  produces<PixelFitter>();
20  }
22 
23  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
25  desc.add<bool>("useRiemannFit", false)->setComment("true for Riemann, false for BrokenLine");
26  descriptions.add("pixelNtupletsFitterDefault", desc);
27  }
28 
29 private:
32  void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
33 };
34 
36  auto const& idealField = iSetup.getData(idealMagneticFieldToken_);
37  float bField = 1 / idealField.inverseBzAtOriginInGeV();
38  auto impl = std::make_unique<PixelNtupletsFitter>(bField, &idealField, useRiemannFit_);
39  auto prod = std::make_unique<PixelFitter>(std::move(impl));
40  iEvent.put(std::move(prod));
41 }
42 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > idealMagneticFieldToken_
int iEvent
Definition: GenABIO.cc:224
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
bool getData(T &iHolder) const
Definition: EventSetup.h:122
PixelNtupletsFitterProducer(const edm::ParameterSet &iConfig)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
def move(src, dest)
Definition: eostools.py:511