CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MuonSeedSimpleCleaner.cc
Go to the documentation of this file.
2 
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 }
18 
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);
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 }
bool checkPt(const TrajectorySeed &seed) const
T perp() const
Definition: PV3DBase.h:69
void clean(TrajectorySeedCollection &seeds) override
tuple result
Definition: mps_fire.py:311
std::vector< TrajectorySeed > TrajectorySeedCollection
T z() const
Definition: PV3DBase.h:61
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
unsigned int detId() const
LocalVector momentum() const
Momentum vector in the local frame.
Definition: DetId.h:17
PTrajectoryStateOnDet const & startingState() const
unsigned int nHits() const
static std::atomic< unsigned int > counter
const LocalTrajectoryParameters & parameters() const