CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > idealMagneticFieldToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:128
int iEvent
Definition: GenABIO.cc:224
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
def move
Definition: eostools.py:511
ParameterDescriptionBase * add(U const &iLabel, T const &value)
PixelNtupletsFitterProducer(const edm::ParameterSet &iConfig)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)