Definition at line 89 of file VertexCompositeCandidateCollectionSelector.cc.
References bsToken_, gather_cfg::cout, debug_, edm::Event::getByToken(), reco::Vertex::isFake(), edm::HandleBase::isValid(), lxyCUT_, lxyWRTbsCUT_, eostools::move(), gen::n, reco::Vertex::ndof(), PV3DBase< T, PVType, FrameType >::perp(), edm::Handle< T >::product(), edm::Event::put(), MetAnalyzer::pv(), pvNDOF_, pvToken_, mps_fire::result, reco::Vertex::tracksSize(), v0Token_, reco::BeamSpot::x(), reco::Vertex::x(), reco::BeamSpot::y(), reco::Vertex::y(), and reco::Vertex::z().
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
93 if (
debug_)
std::cout <<
"VertexCompositeCandidateCollectionSelector::produce" << std::endl;
96 auto result = std::make_unique<reco::VertexCompositeCandidateCollection>();
101 if (beamspotHandle.isValid())
102 bs = &(*beamspotHandle);
109 pv = &pvHandle->front();
118 int n = ( v0Handle.
isValid() ? v0Handle->size() : -1 );
122 auto const& v0s = *v0Handle.
product();
123 for (
auto const& v0 : v0s ) {
128 v0.vy() - bs->
y(v0.vz()),
130 float abslxy = ( pv==
nullptr ?
dummy : displacementFromPV2D.
perp() );
131 float abslxyWRTbs = ( bs==
nullptr ?
dummy : displacementFromBS2D.
perp() );
135 if (abslxy <
lxyCUT_ )
continue;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > v0Token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double y() const
y coordinate
Global3DPoint GlobalPoint
double z() const
z coordinate
double x() const
x coordinate
T const * product() const
double x(const double z) const
x coordinate of the beeam spot position at a given z value (it takes into account the dxdz slope) ...
double y(const double z) const
y coordinate of the beeam spot position at a given z value (it takes into account the dydz slope) ...
edm::EDGetTokenT< reco::VertexCollection > pvToken_
edm::EDGetTokenT< reco::BeamSpot > bsToken_
size_t tracksSize() const
number of tracks