CMS 3D CMS Logo

ProtonTransport.cc
Go to the documentation of this file.
7 #include <CLHEP/Random/RandGauss.h>
8 #include <CLHEP/Units/GlobalSystemOfUnits.h>
9 #include <cctype>
10 
11 ProtonTransport::ProtonTransport(const edm::ParameterSet &iConfig) : instance_(nullptr) {
12  std::string transportMethod_ = iConfig.getParameter<std::string>("TransportMethod");
13  for (auto &c : transportMethod_)
14  c = toupper(c); // just to on the safe side
15 
16  if (transportMethod_ == "HECTOR") {
17  instance_ = new HectorTransport(iConfig);
18  } else if (transportMethod_ == "TOTEM") {
19  instance_ = new TotemTransport(iConfig);
20  } else if (transportMethod_ == "OPTICALFUNCTIONS") {
21  instance_ = new OpticalFunctionsTransport(iConfig);
22  } else {
23  throw cms::Exception("ProtonTransport")
24  << "Unknow transport method. Is must be either HECTOR, TOTEM or OPTICALFUNCTIONS (case insensitive)";
25  }
26 }
ProtonTransport::ProtonTransport
ProtonTransport(const edm::ParameterSet &iConfig)
Definition: ProtonTransport.cc:11
OpticalFunctionsTransport.h
TotemTransport.h
HectorTransport
Definition: HectorTransport.h:35
ProtonTransport.h
PPSUnitConversion.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
ProtonTransport::instance_
BaseProtonTransport * instance_
Definition: ProtonTransport.h:27
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
HectorTransport.h
Exception
Definition: hltDiff.cc:246
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Exception.h
TotemTransport
Definition: TotemTransport.h:23
OpticalFunctionsTransport
Definition: OpticalFunctionsTransport.h:22