45 return sv.numberOfSourceCandidatePtrs();
48 template <
class InputContainer,
class VTX>
68 pdesc.
add<
double>(
"dLenFraction", 0.333);
69 pdesc.
add<
double>(
"dRCut", 0.4);
70 pdesc.
add<
double>(
"distCut", 0.04);
71 pdesc.
add<
double>(
"sigCut", 5.0);
72 pdesc.
add<
double>(
"fitterSigmacut", 3.0);
73 pdesc.
add<
double>(
"fitterTini", 256);
74 pdesc.
add<
double>(
"fitterRatio", 0.25);
75 pdesc.
add<
int>(
"trackMinLayers", 4);
76 pdesc.
add<
double>(
"trackMinPt", 0.4);
77 pdesc.
add<
int>(
"trackMinPixels", 1);
78 pdesc.
add<
double>(
"maxTimeSignificance", 3.5);
80 cdesc.
add(
"trackVertexArbitratorDefault", pdesc);
82 cdesc.
add(
"candidateVertexArbitratorDefault", pdesc);
101 template <
class InputContainer,
class VTX>
103 token_primaryVertex = consumes<reco::VertexCollection>(
params.getParameter<
edm::InputTag>(
"primaryVertices"));
104 token_secondaryVertex = consumes<Product>(
params.getParameter<
edm::InputTag>(
"secondaryVertices"));
108 esConsumes<TransientTrackBuilder, TransientTrackRecord>(
edm::ESInputTag(
"",
"TransientTrackBuilder"));
113 template <
class InputContainer,
class VTX>
115 using namespace reco;
124 auto recoVertices = std::make_unique<Product>();
129 event.getByToken(token_tracks,
tracks);
134 event.getByToken(token_beamSpot,
beamSpot);
144 for (
unsigned int ivtx = 0; ivtx < theRecoVertices.size(); ivtx++) {
145 if (!(
nTracks(theRecoVertices[ivtx]) > 1))
147 recoVertices->push_back(theRecoVertices[ivtx]);
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
TemplatedVertexArbitrator< edm::View< reco::Candidate >, reco::VertexCompositePtrCandidate > CandidateVertexArbitrator
const unsigned int nTracks(const reco::Vertex &sv)
#define DEFINE_FWK_MODULE(type)
std::vector< VTX > Product
bool trackFilter(const reco::TrackRef &track) const
edm::EDGetTokenT< Product > token_secondaryVertex
void produce(edm::Event &event, const edm::EventSetup &es) override
std::unique_ptr< TrackVertexArbitration< VTX > > theArbitrator
static void fillDescriptions(edm::ConfigurationDescriptions &cdesc)
edm::EDGetTokenT< InputContainer > token_tracks
void addDefault(ParameterSetDescription const &psetDescription)
TemplatedVertexArbitrator(const edm::ParameterSet ¶ms)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
auto const & tracks
cannot be loose
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > token_trackBuilder
reco::TransientTrack buildTT(edm::Handle< reco::TrackCollection > &tracks, edm::ESHandle< TransientTrackBuilder > &trackbuilder, unsigned int k)
TemplatedVertexArbitrator< reco::TrackCollection, reco::Vertex > TrackVertexArbitrator