CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ProtonTransport Class Reference

#include <ProtonTransport.h>

Public Member Functions

void addPartToHepMC (const HepMC::GenEvent *iev, HepMC::GenEvent *ev)
 
std::vector< LHCTransportLink > & getCorrespondenceMap ()
 
void process (const HepMC::GenEvent *ev, const edm::EventSetup &es, CLHEP::HepRandomEngine *engine)
 
 ProtonTransport (const edm::ParameterSet &iConfig, edm::ConsumesCollector iC)
 
 ~ProtonTransport ()=default
 

Private Attributes

std::unique_ptr< BaseProtonTransportinstance_
 

Detailed Description

Definition at line 14 of file ProtonTransport.h.

Constructor & Destructor Documentation

◆ ProtonTransport()

ProtonTransport::ProtonTransport ( const edm::ParameterSet iConfig,
edm::ConsumesCollector  iC 
)

Definition at line 9 of file ProtonTransport.cc.

References HltBtagPostValidation_cff::c, Exception, edm::ParameterSet::getParameter(), instance_, and AlCaHLTBitMon_QueryRunRegistry::string.

9  {
10  std::string transportMethod_ = iConfig.getParameter<std::string>("TransportMethod");
11  for (auto &c : transportMethod_)
12  c = toupper(c); // just to on the safe side
13 
14  if (transportMethod_ == "HECTOR") {
15  instance_ = std::make_unique<HectorTransport>(iConfig, iC);
16  } else if (transportMethod_ == "TOTEM") {
17  instance_ = std::make_unique<TotemTransport>(iConfig);
18  } else if (transportMethod_ == "OPTICALFUNCTIONS") {
19  instance_ = std::make_unique<OpticalFunctionsTransport>(iConfig, iC);
20  } else {
21  throw cms::Exception("ProtonTransport")
22  << "Unknow transport method. Is must be either HECTOR, TOTEM or OPTICALFUNCTIONS (case insensitive)";
23  }
24 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< BaseProtonTransport > instance_

◆ ~ProtonTransport()

ProtonTransport::~ProtonTransport ( )
default

Member Function Documentation

◆ addPartToHepMC()

void ProtonTransport::addPartToHepMC ( const HepMC::GenEvent iev,
HepMC::GenEvent ev 
)
inline

Definition at line 23 of file ProtonTransport.h.

References makeMEIFBenchmarkPlots::ev, caHitNtupletGeneratorKernels::iev, and instance_.

Referenced by PPSSimTrackProducer::produce().

23 { instance_->addPartToHepMC(iev, ev); }
TkSoAView< TrackerTraits > HitToTuple< TrackerTraits > const *__restrict__ int32_t int32_t int iev
std::unique_ptr< BaseProtonTransport > instance_

◆ getCorrespondenceMap()

std::vector<LHCTransportLink>& ProtonTransport::getCorrespondenceMap ( )
inline

Definition at line 19 of file ProtonTransport.h.

References instance_.

Referenced by PPSSimTrackProducer::produce().

19 { return instance_->getCorrespondenceMap(); }
std::unique_ptr< BaseProtonTransport > instance_

◆ process()

void ProtonTransport::process ( const HepMC::GenEvent ev,
const edm::EventSetup es,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 20 of file ProtonTransport.h.

References makeMEIFBenchmarkPlots::ev, and instance_.

Referenced by PPSSimTrackProducer::produce().

20  {
21  instance_->process(ev, es, engine);
22  }
std::unique_ptr< BaseProtonTransport > instance_

Member Data Documentation

◆ instance_

std::unique_ptr<BaseProtonTransport> ProtonTransport::instance_
private

Definition at line 26 of file ProtonTransport.h.

Referenced by addPartToHepMC(), getCorrespondenceMap(), process(), and ProtonTransport().