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)
 
 ~ProtonTransport ()
 

Private Attributes

BaseProtonTransportinstance_
 

Detailed Description

Definition at line 12 of file ProtonTransport.h.

Constructor & Destructor Documentation

◆ ProtonTransport()

ProtonTransport::ProtonTransport ( const edm::ParameterSet iConfig)

Definition at line 11 of file ProtonTransport.cc.

11  : 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 }

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

◆ ~ProtonTransport()

ProtonTransport::~ProtonTransport ( )
inline

Definition at line 15 of file ProtonTransport.h.

15  {
16  if (instance_)
17  delete instance_;
18  };

References instance_.

Member Function Documentation

◆ addPartToHepMC()

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

Definition at line 24 of file ProtonTransport.h.

24 { instance_->addPartToHepMC(iev, ev); }

References BaseProtonTransport::addPartToHepMC(), ev, and instance_.

Referenced by PPSSimTrackProducer::produce().

◆ getCorrespondenceMap()

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

Definition at line 20 of file ProtonTransport.h.

20 { return instance_->getCorrespondenceMap(); }

References BaseProtonTransport::getCorrespondenceMap(), and instance_.

Referenced by PPSSimTrackProducer::produce().

◆ process()

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

Definition at line 21 of file ProtonTransport.h.

21  {
22  instance_->process(ev, es, engine);
23  }

References ev, instance_, and BaseProtonTransport::process().

Referenced by PPSSimTrackProducer::produce().

Member Data Documentation

◆ instance_

BaseProtonTransport* ProtonTransport::instance_
private
HectorTransport
Definition: HectorTransport.h:35
BaseProtonTransport::process
virtual void process(const HepMC::GenEvent *ev, const edm::EventSetup &es, CLHEP::HepRandomEngine *engine)=0
BaseProtonTransport::addPartToHepMC
void addPartToHepMC(const HepMC::GenEvent *, HepMC::GenEvent *)
Definition: BaseProtonTransport.cc:55
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ProtonTransport::instance_
BaseProtonTransport * instance_
Definition: ProtonTransport.h:27
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:246
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TotemTransport
Definition: TotemTransport.h:23
BaseProtonTransport::getCorrespondenceMap
std::vector< LHCTransportLink > & getCorrespondenceMap()
Definition: BaseProtonTransport.h:22
OpticalFunctionsTransport
Definition: OpticalFunctionsTransport.h:22