20 #include "CLHEP/Random/RandGauss.h" 40 #define init_param(type, varname) varname(ps.getParameter<type>(#varname)) 123 auto pOutput = std::make_unique<reco::VertexCollection>();
137 throw cms::Exception(
"FFTJetBadConfig") <<
"ERROR in FFTJetVertexAdder:" 138 " could not find beam spot information" 141 xmean = beamSpotHandle->
x0();
142 ymean = beamSpotHandle->
y0();
143 zmean = beamSpotHandle->
z0();
147 zwidth = beamSpotHandle->
sigmaZ();
151 for (
unsigned i = 0;
i < 3; ++
i)
152 for (
unsigned j = 0;
j < 3; ++
j)
159 const double x0 = rGauss(xmean, xwidth);
160 const double y0 = rGauss(ymean, ywidth);
161 const double z0 = rGauss(zmean, zwidth);
167 typedef reco::VertexCollection::const_iterator IV;
172 throw cms::Exception(
"FFTJetBadConfig") <<
"ERROR in FFTJetVertexAdder:" 173 " could not find existing collection of vertices" 178 pOutput->push_back(*
iv);
188 throw cms::Exception(
"FFTJetBadConfig") <<
"ERROR in FFTJetVertexAdder:" 189 " failed to initialize the random number generator" double BeamWidthX() const
beam width X
const std::string outputLabel
const bool addExistingVertices
void beginStream(edm::StreamID) override
math::Error< dimension >::type Error
covariance error matrix (3x3)
#define init_param(type, varname)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
edm::EDGetTokenT< reco::VertexCollection > existingVerticesToken
const unsigned nVerticesToMake
const edm::InputTag beamSpotLabel
double x0() const
x coordinate
FFTJetVertexAdder & operator=(const FFTJetVertexAdder &)=delete
double BeamWidthY() const
beam width Y
math::XYZPoint Point
point in the space
#define DEFINE_FWK_MODULE(type)
const edm::InputTag existingVerticesLabel
double y0() const
y coordinate
~FFTJetVertexAdder() override
void produce(edm::Event &, const edm::EventSetup &) override
double sigmaZ() const
sigma z
double z0() const
z coordinate
static int position[264][3]
FFTJetVertexAdder()=delete
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken