CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
MuonSeedSimpleCleaner Class Reference

#include <MuonSeedSimpleCleaner.h>

Inheritance diagram for MuonSeedSimpleCleaner:
MuonSeedVCleaner

Public Member Functions

void clean (TrajectorySeedCollection &seeds) override
 
- Public Member Functions inherited from MuonSeedVCleaner
virtual ~MuonSeedVCleaner ()
 

Private Member Functions

bool checkPt (const TrajectorySeed &seed) const
 

Detailed Description

Definition at line 6 of file MuonSeedSimpleCleaner.h.

Member Function Documentation

◆ checkPt()

bool MuonSeedSimpleCleaner::checkPt ( const TrajectorySeed seed) const
private

Definition at line 19 of file MuonSeedSimpleCleaner.cc.

References hcalRecHitTable_cff::detId, PixelPluginsPhase0_cfi::isBarrel, AlCaHLTBitMon_ParallelJobs::p, DiDispStaMuonMonitor_cfi::pt, nano_mu_digi_cff::rawId, mps_fire::result, and fileCollector::seed.

Referenced by clean().

19  {
20  bool result = true;
21  if (seed.nHits() == 1) {
22  int rawId = seed.startingState().detId();
23  DetId detId(rawId);
24 
25  bool isBarrel = (detId.subdetId() == 1);
26  LocalVector p = seed.startingState().parameters().momentum();
27  // homemade local-to-global
28  double pt = (isBarrel) ? -p.z() : p.perp();
29  if (fabs(pt) < 3.05) {
30  result = false;
31  }
32  }
33  return result;
34 }
Definition: DetId.h:17

◆ clean()

void MuonSeedSimpleCleaner::clean ( TrajectorySeedCollection seeds)
overridevirtual

Implements MuonSeedVCleaner.

Definition at line 3 of file MuonSeedSimpleCleaner.cc.

References checkPt(), fileCollector::seed, and HLT_2024v14_cff::seeds.

3  {
4  for (std::vector<TrajectorySeed>::iterator seed = seeds.begin(); seed != seeds.end(); ++seed) {
5  if (!checkPt(*seed)) {
6  seeds.erase(seed--);
7  } else {
8  int counter = 0;
9  for (std::vector<TrajectorySeed>::iterator seed2 = seed; seed2 != seeds.end(); ++seed2)
10  if (seed->startingState().parameters().vector() == seed2->startingState().parameters().vector())
11  ++counter;
12  if (counter > 1) {
13  seeds.erase(seed--);
14  }
15  }
16  }
17 }
bool checkPt(const TrajectorySeed &seed) const