21 #include "CLHEP/Random/RandGauss.h"
41 #define init_param(type, varname) varname (ps.getParameter< type >( #varname ))
94 init_param(edm::InputTag, existingVerticesLabel),
143 <<
"ERROR in FFTJetVertexAdder:"
144 " could not find beam spot information"
147 xmean = beamSpotHandle->x0();
148 ymean = beamSpotHandle->y0();
149 zmean = beamSpotHandle->z0();
151 xwidth = beamSpotHandle->BeamWidthX();
152 ywidth = beamSpotHandle->BeamWidthY();
153 zwidth = beamSpotHandle->sigmaZ();
157 for (
unsigned i=0;
i<3; ++
i)
158 for (
unsigned j=0;
j<3; ++
j)
166 const double x0 = (*rGauss_)(xmean, xwidth);
167 const double y0 = (*rGauss_)(ymean, ywidth);
168 const double z0 = (*rGauss_)(zmean, zwidth);
175 typedef reco::VertexCollection::const_iterator IV;
181 <<
"ERROR in FFTJetVertexAdder:"
182 " could not find existing collection of vertices"
185 const IV vertend(vertices->end());
186 for (IV iv=vertices->begin(); iv!=vertend; ++iv)
187 pOutput->push_back(*iv);
202 <<
"ERROR in FFTJetVertexAdder:"
203 " failed to initialize the random number generator"
const std::string outputLabel
const bool addExistingVertices
#define DEFINE_FWK_MODULE(type)
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
#define init_param(type, varname)
static int position[TOTALCHAMBERS][3]
const unsigned nVerticesToMake
const edm::InputTag beamSpotLabel
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
const edm::InputTag existingVerticesLabel
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
FFTJetVertexAdder & operator=(const FFTJetVertexAdder &)
CLHEP::RandGauss * rGauss_
void produce(edm::Event &, const edm::EventSetup &)