224 beamSpot = *recoBeamSpotHandle;
231 size_t nmu = muons->size();
232 std::vector<int> propagatesToM2(nmu), hasL1Particle(nmu), hasL1Filtered(nmu);
233 std::vector<int> hasL2Seed(nmu), hasL2Muon(nmu), hasL2MuonFiltered(nmu);
234 std::vector<int> hasL3Seed(nmu), hasL3Track(nmu), hasL3TrackFiltered(nmu), hasL3Muon(nmu), hasL3MuonFiltered(nmu);
235 std::vector<reco::CandidatePtr> l1ptr(nmu), l2ptr(nmu), l3ptr(nmu);
237 for (
size_t i = 0;
i < nmu; ++
i) {
242 if (!stateAtMB2.
isValid())
continue;
243 propagatesToM2[
i] = 1;
247 l1extra::L1MuonParticleCollection::const_iterator it;
248 L2MuonTrajectorySeedCollection::const_iterator iSeed;
249 L3MuonTrajectorySeedCollection::const_iterator iSeedL3;
250 RecoChargedCandidateCollection::const_iterator iL2Muon;
251 reco::TrackCollection::const_iterator tktrackL3;
252 RecoChargedCandidateCollection::const_iterator iL3Muon;
255 for(it = L1Muons->begin(); it != L1Muons->end(); ++it) {
260 double L1phi =(*it).phi();
261 double L1eta =(*it).eta();
262 double L1pt =(*it).pt();
263 double dR=
deltaR(etaTk,phiTk,L1eta,L1phi);
268 if (!hasL1Particle[
i]) l1ptr[
i] = thisL1;
271 if ((quality <= 3) || (L1pt<7))
continue;
272 if (!hasL1Filtered[i]) l1ptr[
i] = thisL1;
275 if(!L2Seeds.
isValid())
continue;
277 for( iSeed = L2Seeds->begin(); iSeed != L2Seeds->end(); ++iSeed) {
280 if (l1FromSeed.
id() != L1Muons.
id())
throw cms::Exception(
"CorruptData") <<
"You're using a different L1 collection than the one used by L2 seeds.\n";
281 if (l1FromSeed.
key() != thisL1.
key())
continue;
282 if (!hasL2Seed[i]) l1ptr[
i] = thisL1;
285 if(!L2Muons.
isValid())
continue;
287 for( iL2Muon = L2Muons->begin(); iL2Muon != L2Muons->end(); ++iL2Muon) {
301 for(
size_t jjj=0; jjj<seeds.
size(); jjj++){
303 if(seeds[jjj]->l1Particle()!= l1FromSeed)
continue;
309 if (!hasL2Muon[i]) { l1ptr[
i] = thisL1; l2ptr[
i] = thisL2; }
314 double Eta_L2= L2Track.
eta();
315 double Pt_L2= L2Track.
pt();
317 double BSPos_L2 = L2Track.
dxy(beamSpot.
position());
318 double dz_L2 =L2Track.
dz();
319 double err0_L2 = L2Track.
error(0);
320 double abspar0_L2 = fabs(L2Track.
parameter(0));
321 double ptLx_L2 = Pt_L2;
322 if (abspar0_L2>0) ptLx_L2 +=
nsigma_Pt_L2*err0_L2/abspar0_L2*Pt_L2;
326 if (!passFilter)
continue;
327 if (!hasL2MuonFiltered[i]) { l1ptr[
i] = thisL1; l2ptr[
i] = thisL2; }
328 hasL2MuonFiltered[
i]++;
333 if (!L3Seeds.
isValid())
continue;
334 for (iSeedL3 = L3Seeds->begin(); iSeedL3!= L3Seeds->end(); ++iSeedL3){
336 TrackRef staTrack = iSeedL3->l2Track();
337 if (staTrack!=L2FilteredRef)
continue;
338 if (!hasL3Seed[i]) { l1ptr[
i] = thisL1; l2ptr[
i] = thisL2; }
341 if (!L3TkTracks.
isValid())
continue;
342 for (tktrackL3 = L3TkTracks->begin(); tktrackL3!= L3TkTracks->end(); ++tktrackL3){
345 TrackRef staTrack2 = l3seedRef->l2Track();
347 if (staTrack2!=L2FilteredRef)
continue;
348 if (!hasL3Track[i]) { l1ptr[
i] = thisL1; l2ptr[
i] = thisL2; }
351 if (!L3Muons.
isValid())
continue;
352 for (iL3Muon = L3Muons->begin(); iL3Muon != L3Muons->end(); ++iL3Muon) {
355 TrackRef staTrack3 = l3seedRef2->l2Track();
357 if (staTrack3!=L2FilteredRef)
continue;
360 if (!hasL3Muon[i]) { l1ptr[
i] = thisL1; l2ptr[
i] = thisL2; l3ptr[
i] = thisL3; }
364 double Eta_L3= L3Track.
eta();
365 double Pt_L3= L3Track.
pt();
367 double BSPos_L3 = L3Track.
dxy(beamSpot.
position());
368 double dz_L3 =L3Track.
dz();
369 double err0_L3 = L3Track.
error(0);
370 double abspar0_L3 = fabs(L3Track.
parameter(0));
371 double ptLx_L3 = Pt_L3;
373 if (abspar0_L3>0) ptLx_L3 +=
nsigma_Pt_L3*err0_L3/abspar0_L3*Pt_L3;
377 if (!hasL3MuonFiltered[i]) { l1ptr[
i] = thisL1; l2ptr[
i] = thisL2; l3ptr[
i] = thisL3; }
378 hasL3MuonFiltered[
i]++;
388 storeValueMap<int>(
event,
muons, propagatesToM2,
"propagatesToM2");
389 storeValueMap<int>(
event,
muons, hasL1Particle,
"hasL1Particle");
390 storeValueMap<int>(
event,
muons, hasL1Filtered,
"hasL1Filtered");
391 storeValueMap<int>(
event,
muons, hasL2Seed,
"hasL2Seed");
392 storeValueMap<int>(
event,
muons, hasL2Muon,
"hasL2Muon");
393 storeValueMap<int>(
event,
muons, hasL2MuonFiltered,
"hasL2MuonFiltered");
394 storeValueMap<int>(
event,
muons, hasL3Seed,
"hasL3Seed");
395 storeValueMap<int>(
event,
muons, hasL3Track,
"hasL3Track");
396 storeValueMap<int>(
event,
muons, hasL3Muon,
"hasL3Muon");
397 storeValueMap<int>(
event,
muons, hasL3MuonFiltered,
"hasL3MuonFiltered");
398 storeValueMap<reco::CandidatePtr>(
event,
muons, l1ptr,
"l1Candidate");
399 storeValueMap<reco::CandidatePtr>(
event,
muons, l2ptr,
"l2Candidate");
400 storeValueMap<reco::CandidatePtr>(
event,
muons, l3ptr,
"l3Candidate");
TrajectoryStateOnSurface extrapolate(const reco::Track &tk) const
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > l1Token_
Geom::Phi< T > phi() const
edm::EDGetTokenT< L3MuonTrajectorySeedCollection > theL3SeedsToken_
edm::EDGetTokenT< L2MuonTrajectorySeedCollection > theL2SeedsToken_
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > theL2MuonsToken_
GlobalPoint globalPosition() const
key_type key() const
Accessor for product key.
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > theL3MuonsToken_
ProductID id() const
Accessor for product ID.
double eta() const
pseudorapidity of momentum vector
double pt() const
track transverse momentum
double error(int i) const
error on specified element
edm::EDGetTokenT< SeedMap > seedMapToken_
unsigned short numberOfValidHits() const
number of valid hits found
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 parameter(int i) const
i-th parameter ( i = 0, ... 4 )
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...
edm::EDGetTokenT< edm::View< reco::Muon > > tagToken_
unsigned int quality() const
get quality
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
edm::EDGetTokenT< reco::TrackCollection > theL3TkTracksToken_
size_type size() const
Size of the RefVector.
const Point & position() const
position
PropagateToMuon l1matcher_
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...