18 bool vertexAvailable=
false;
24 if (recoBeamSpotHandle.
isValid()){
25 vertexPoint = recoBeamSpotHandle->position();
26 vertexAvailable =
true;
34 if ((recoVertexHandle.
isValid()) && (recoVertexHandle->size()>0)){
35 vertexPoint = recoVertexHandle->at(0).position();
36 vertexAvailable =
true;
47 event.getByToken(*trackSrc, tracks);
48 if ((tracks.
isValid())&&(tracks->size()>0)){
49 for (
unsigned i = 0;
i < tracks->size(); ++
i) {
50 double pt=tracks->ptrAt(
i)->pt();
53 track = &*tracks->ptrAt(
i);
65 event.getByToken(*recoCandidateSrc, recocandidates);
66 if ((recocandidates.
isValid())&&(recocandidates->size()>0)){
67 for (
unsigned i = 0;
i < recocandidates->size(); ++
i) {
68 double pt=recocandidates->ptrAt(
i)->pt();
71 track =
dynamic_cast<const reco::Track*
>(recocandidates->ptrAt(
i)->bestTrack());
83 std::vector<reco::ElectronRef> recocandidates;
85 if ((recocandidates.size()>0)){
86 for (
unsigned i = 0;
i < recocandidates.size(); ++
i) {
87 double pt=recocandidates.at(
i)->pt();
90 track =
dynamic_cast<const reco::Track*
>(recocandidates.at(
i)->bestTrack());
101 std::vector<reco::RecoChargedCandidateRef> recocandidates;
103 if ((recocandidates.size()>0)){
104 for (
unsigned i = 0;
i < recocandidates.size(); ++
i) {
105 double pt=recocandidates.at(
i)->pt();
108 track =
dynamic_cast<const reco::Track*
>(recocandidates.at(
i)->bestTrack());
117 event.getByToken(
tauSrc_, taus);
120 if ((!pfTau->leadPFChargedHadrCand().isNonnull())||
121 (!pfTau->leadPFChargedHadrCand()->trackRef().isNonnull()))
129 if((track)&&(fabs(pfTau->leadPFChargedHadrCand()->trackRef()->dz(vertexPoint) - track->
dz(vertexPoint)) <
dZ_))
130 selTaus->push_back(*pfTau);
135 if (fabs(pfTau->leadPFChargedHadrCand()->trackRef()->dz(vertexPoint))<
dZ_)
136 selTaus->push_back(*pfTau);
144 if((track)&&(fabs(pfTau->leadPFChargedHadrCand()->trackRef()->dz() - track->
dz()) <
dZ_))
145 selTaus->push_back(*pfTau);
149 unsigned filterTaus=selTaus->size();
150 std::auto_ptr<reco::PFTauCollection> selectedTaus(selTaus);
151 event.put(selectedTaus);
std::vector< PFTau > PFTauCollection
collection of PFTau objects
edm::EDGetTokenT< edm::View< reco::PFTau > > tauSrc_
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > triggerFilterElectronsSrc_
bool useTriggerFilterElectrons_
bool useTriggerFilterMuons_
edm::EDGetTokenT< reco::BeamSpot > beamSpotSrc_
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
std::vector< edm::EDGetTokenT< edm::View< reco::RecoCandidate > > > recoCandidateSrc_
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
virtual bool filter(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > triggerFilterMuonsSrc_
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > trackSrc_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
bool useLeadingRecoCandidate_
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexSrc_