22 bool vertexAvailable=
false;
28 if (recoBeamSpotHandle.
isValid()){
29 vertexPoint = recoBeamSpotHandle->position();
30 vertexAvailable =
true;
38 if ((recoVertexHandle.
isValid()) && (recoVertexHandle->size()>0)){
39 vertexPoint = recoVertexHandle->at(0).position();
40 vertexAvailable =
true;
50 for( std::vector<edm::InputTag>::const_iterator trackSrc =
trackSrc_.begin(); trackSrc !=
trackSrc_.end(); ++ trackSrc ) {
51 event.getByLabel(*trackSrc, tracks);
52 if ((tracks.
isValid())&&(tracks->size()>0)){
53 for (
unsigned i = 0;
i < tracks->size(); ++
i) {
54 double pt=tracks->ptrAt(
i)->pt();
57 track = &*tracks->ptrAt(
i);
69 event.getByLabel(*recoCandidateSrc, recocandidates);
70 if ((recocandidates.
isValid())&&(recocandidates->size()>0)){
71 for (
unsigned i = 0;
i < recocandidates->size(); ++
i) {
72 double pt=recocandidates->ptrAt(
i)->pt();
75 track =
dynamic_cast<const reco::Track*
>(recocandidates->ptrAt(
i)->bestTrack());
87 std::vector<reco::ElectronRef> recocandidates;
89 if ((recocandidates.size()>0)){
90 for (
unsigned i = 0;
i < recocandidates.size(); ++
i) {
91 double pt=recocandidates.at(
i)->pt();
94 track =
dynamic_cast<const reco::Track*
>(recocandidates.at(
i)->bestTrack());
105 std::vector<reco::RecoChargedCandidateRef> recocandidates;
107 if ((recocandidates.size()>0)){
108 for (
unsigned i = 0;
i < recocandidates.size(); ++
i) {
109 double pt=recocandidates.at(
i)->pt();
112 track =
dynamic_cast<const reco::Track*
>(recocandidates.at(
i)->bestTrack());
121 event.getByLabel(
tauSrc_, taus);
124 if ((!pfTau->leadPFChargedHadrCand().isNonnull())||
125 (!pfTau->leadPFChargedHadrCand()->trackRef().isNonnull()))
133 if((track)&&(fabs(pfTau->leadPFChargedHadrCand()->trackRef()->dz(vertexPoint) - track->
dz(vertexPoint)) <
dZ_))
134 selTaus->push_back(*pfTau);
139 if (fabs(pfTau->leadPFChargedHadrCand()->trackRef()->dz(vertexPoint))<
dZ_)
140 selTaus->push_back(*pfTau);
148 if((track)&&(fabs(pfTau->leadPFChargedHadrCand()->trackRef()->dz() - track->
dz()) <
dZ_))
149 selTaus->push_back(*pfTau);
153 unsigned filterTaus=selTaus->size();
154 std::auto_ptr<reco::PFTauCollection> selectedTaus(selTaus);
155 event.put(selectedTaus);
edm::InputTag triggerFilterElectronsSrc_
std::vector< edm::InputTag > recoCandidateSrc_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
std::vector< PFTau > PFTauCollection
collection of PFTau objects
std::vector< edm::InputTag > trackSrc_
edm::InputTag triggerFilterMuonsSrc_
edm::InputTag beamSpotSrc_
bool useTriggerFilterElectrons_
virtual bool filter(edm::Event &, const edm::EventSetup &)
bool useTriggerFilterMuons_
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
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...
XYZPointD XYZPoint
point in space with cartesian internal representation
bool useLeadingRecoCandidate_