1 #ifndef TemplatedVertexArbitrator_h
2 #define TemplatedVertexArbitrator_h
51 template <
class InputContainer,
class VTX>
71 template <
class InputContainer,
class VTX>
82 template <
class InputContainer,
class VTX>
94 std::auto_ptr<Product> recoVertices(
new Product);
99 event.getByToken(token_tracks, tracks);
106 event.getByToken(token_beamSpot,beamSpot);
109 for(
typename InputContainer::const_iterator track = tracks->begin();
110 track != tracks->end(); ++track) {
111 selectedTracks.push_back(
tthelpers::buildTT(tracks,trackBuilder,track - tracks->begin()));
116 Product theRecoVertices = theArbitrator->trackVertexArbitrator(beamSpot, pv, selectedTracks,
119 for(
unsigned int ivtx=0; ivtx < theRecoVertices.size(); ivtx++){
120 if ( !(
nTracks(theRecoVertices[ivtx]) > 1) )
continue;
121 recoVertices->push_back(theRecoVertices[ivtx]);
125 event.put(recoVertices);
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
std::unique_ptr< TrackVertexArbitration< VTX > > theArbitrator
edm::EDGetTokenT< InputContainer > token_tracks
TemplatedVertexArbitrator(const edm::ParameterSet ¶ms)
virtual size_type numberOfSourceCandidatePtrs() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
unsigned int nTracks(float minWeight=0.5) const
Returns the number of tracks in the vertex with weight above minWeight.
bool trackFilter(const reco::TrackRef &track) const
reco::TransientTrack buildTT(edm::Handle< reco::TrackCollection > &tracks, edm::ESHandle< TransientTrackBuilder > &trackbuilder, unsigned int k)