CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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_ = std::make_unique<HectorTransport>(iConfig, iC);
18  } else if (transportMethod_ == "TOTEM") {
19  instance_ = std::make_unique<TotemTransport>(iConfig);
20  } else if (transportMethod_ == "OPTICALFUNCTIONS") {
21  instance_ = std::make_unique<OpticalFunctionsTransport>(iConfig, iC);
22  } else {
23  throw cms::Exception("ProtonTransport")
24  << "Unknow transport method. Is must be either HECTOR, TOTEM or OPTICALFUNCTIONS (case insensitive)";
25  }
26 }
const edm::EventSetup & c
std::unique_ptr< BaseProtonTransport > instance_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ProtonTransport(const edm::ParameterSet &iConfig, edm::ConsumesCollector iC)