1 #ifndef TemplatedVertexArbitrator_h 2 #define TemplatedVertexArbitrator_h 51 template <
class InputContainer,
class VTX>
71 pdesc.
add<
double>(
"dLenFraction",0.333);
72 pdesc.
add<
double>(
"dRCut",0.4);
73 pdesc.
add<
double>(
"distCut",0.04);
74 pdesc.
add<
double>(
"sigCut",5.0);
75 pdesc.
add<
double>(
"fitterSigmacut",3.0);
76 pdesc.
add<
double>(
"fitterTini",256);
77 pdesc.
add<
double>(
"fitterRatio",0.25);
78 pdesc.
add<
int>(
"trackMinLayers",4);
79 pdesc.
add<
double>(
"trackMinPt",0.4);
80 pdesc.
add<
int>(
"trackMinPixels",1);
81 pdesc.
add<
double>(
"maxTimeSignificance",3.5);
83 cdesc.
add(
"trackVertexArbitratorDefault",pdesc);
85 cdesc.
add(
"candidateVertexArbitratorDefault",pdesc);
104 template <
class InputContainer,
class VTX>
115 template <
class InputContainer,
class VTX>
118 using namespace reco;
127 auto recoVertices = std::make_unique<Product>();
128 if(primaryVertices->size()!=0){
142 for(
typename InputContainer::const_iterator
track = tracks->begin();
152 for(
unsigned int ivtx=0; ivtx < theRecoVertices.size(); ivtx++){
153 if ( !(
nTracks(theRecoVertices[ivtx]) > 1) )
continue;
154 recoVertices->push_back(theRecoVertices[ivtx]);
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
T getParameter(std::string const &) const
const unsigned int nTracks(const reco::Vertex &sv)
std::vector< VTX > Product
edm::EDGetTokenT< Product > token_secondaryVertex
virtual void produce(edm::Event &event, const edm::EventSetup &es) override
size_type numberOfSourceCandidatePtrs() const 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)
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
T const * product() const
unsigned int nTracks(float minWeight=0.5) const
Returns the number of tracks in the vertex with weight above minWeight.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool trackFilter(const reco::TrackRef &track) const
reco::TransientTrack buildTT(edm::Handle< reco::TrackCollection > &tracks, edm::ESHandle< TransientTrackBuilder > &trackbuilder, unsigned int k)