CMS 3D CMS Logo

GeantPropagatorESProducer.cc
Go to the documentation of this file.
2 
4 
9 
10 #include <memory>
11 #include <string>
12 
13 using namespace edm;
14 
16  : magFieldToken_(setWhatProduced(this, p.getParameter<std::string>("ComponentName"))
17  .consumesFrom<MagneticField, IdealMagneticFieldRecord>(edm::ESInputTag("", ""))) {
18  pset_ = p;
19  plimit_ = pset_.getParameter<double>("PropagationPtotLimit");
20 }
21 
23 
24 std::unique_ptr<Propagator> GeantPropagatorESProducer::produce(const TrackingComponentsRecord &iRecord) {
25  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
27 
29 
30  if (pdir == "oppositeToMomentum") {
32  } else if (pdir == "alongMomentum") {
34  } else if (pdir == "anyDirection") {
35  dir = anyDirection;
36  }
37 
38  return std::make_unique<Geant4ePropagator>(&(iRecord.get(magFieldToken_)), particleName, dir, plimit_);
39 }
GeantPropagatorESProducer::pset_
edm::ParameterSet pset_
Definition: GeantPropagatorESProducer.h:27
anyDirection
Definition: PropagationDirection.h:4
edm::ESInputTag
Definition: ESInputTag.h:87
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GeantPropagatorESProducer.h
GeantPropagatorESProducer::plimit_
double plimit_
Definition: GeantPropagatorESProducer.h:29
ESProducer.h
oppositeToMomentum
Definition: PropagationDirection.h:4
GeantPropagatorESProducer::~GeantPropagatorESProducer
~GeantPropagatorESProducer() override
Definition: GeantPropagatorESProducer.cc:22
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
Geant4ePropagator.h
HiggsValidation_cfi.particleName
particleName
Definition: HiggsValidation_cfi.py:7
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:103
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeantPropagatorESProducer::magFieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: GeantPropagatorESProducer.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
GeantPropagatorESProducer::GeantPropagatorESProducer
GeantPropagatorESProducer(const edm::ParameterSet &p)
Definition: GeantPropagatorESProducer.cc:15
ModuleFactory.h
std
Definition: JetResolutionObject.h:76
GeantPropagatorESProducer::produce
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition: GeantPropagatorESProducer.cc:24
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MagneticField
Definition: MagneticField.h:19
alongMomentum
Definition: PropagationDirection.h:4
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12