CMS 3D CMS Logo

GeantPropagatorESProducer.cc
Go to the documentation of this file.
5 
10 
11 #include <memory>
12 #include <string>
13 
14 using namespace edm;
15 
17  std::string myname = p.getParameter<std::string>("ComponentName");
18  pset_ = p;
19  plimit_ = pset_.getParameter<double>("PropagationPtotLimit");
20  setWhatProduced(this, myname);
21 }
22 
24 
25 std::unique_ptr<Propagator> GeantPropagatorESProducer::produce(const TrackingComponentsRecord &iRecord) {
28 
29  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
30  std::string particleName = pset_.getParameter<std::string>("ParticleName");
31 
33 
34  if (pdir == "oppositeToMomentum")
36  else if (pdir == "alongMomentum")
38  else if (pdir == "anyDirection")
39  dir = anyDirection;
40 
41  return std::make_unique<Geant4ePropagator>(&(*magfield), particleName, dir, plimit_);
42 }
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:51
anyDirection
Definition: PropagationDirection.h:4
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GeantPropagatorESProducer.h
ESProducer.h
oppositeToMomentum
Definition: PropagationDirection.h:4
GeantPropagatorESProducer::~GeantPropagatorESProducer
~GeantPropagatorESProducer() override
Definition: GeantPropagatorESProducer.cc:23
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
Geant4ePropagator.h
IdealMagneticFieldRecord.h
edm::ESHandle< MagneticField >
HiggsValidation_cfi.particleName
particleName
Definition: HiggsValidation_cfi.py:7
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
GeantPropagatorESProducer::GeantPropagatorESProducer
GeantPropagatorESProducer(const edm::ParameterSet &p)
Definition: GeantPropagatorESProducer.cc:16
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:669
MagneticField.h
ModuleFactory.h
GeantPropagatorESProducer::produce
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
Definition: GeantPropagatorESProducer.cc:25
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
EventSetup.h
volumeBasedMagneticField_160812_cfi.magfield
magfield
Definition: volumeBasedMagneticField_160812_cfi.py:11
alongMomentum
Definition: PropagationDirection.h:4
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12