Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
TauAnalysis
MCEmbeddingTools
src
ParticleReplacerFactory.cc
Go to the documentation of this file.
1
#include "
TauAnalysis/MCEmbeddingTools/interface/ParticleReplacerFactory.h
"
2
#include "
TauAnalysis/MCEmbeddingTools/interface/ParticleReplacerClass.h
"
3
#include "
TauAnalysis/MCEmbeddingTools/interface/ParticleReplacerParticleGun.h
"
4
5
boost::shared_ptr<ParticleReplacerBase>
ParticleReplacerFactory::create
(
const
std::string&
algo
,
const
edm::ParameterSet
& iConfig) {
6
bool
verbose
= iConfig.
getParameter
<
bool
>(
"verbose"
);
7
if
(algo ==
"ZTauTau"
)
8
return
boost::shared_ptr<ParticleReplacerBase>(
new
ParticleReplacerClass
(iConfig.
getParameter
<
edm::ParameterSet
>(
"ZTauTau"
), verbose));
9
else
if
(algo ==
"ParticleGun"
)
10
return
boost::shared_ptr<ParticleReplacerBase>(
new
ParticleReplacerParticleGun
(iConfig.
getParameter
<
edm::ParameterSet
>(
"ParticleGun"
), verbose));
11
else
12
throw
cms::Exception
(
"Configuration"
) <<
"Unknown particle replacer algorithm "
<< algo
13
<<
". Supported algorithms: 'ZTauTau', 'ParticleGun'."
<< std::endl;
14
}
ParticleReplacerClass.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ParticleReplacerClass
Definition:
ParticleReplacerClass.h:56
verbose
Definition:
MagVerbosity.h:13
ParticleReplacerFactory::create
static boost::shared_ptr< ParticleReplacerBase > create(const std::string &algo, const edm::ParameterSet &iConfig)
Definition:
ParticleReplacerFactory.cc:5
ParticleReplacerParticleGun
Definition:
ParticleReplacerParticleGun.h:29
ParticleReplacerParticleGun.h
ParticleReplacerFactory.h
edm::hlt::Exception
error
Definition:
HLTenums.h:24
edm::ParameterSet
Definition:
ParameterSet.h:35
algo
LimitAlgo * algo
Definition:
Combine.cc:60
Generated for CMSSW Reference Manual by
1.8.5