RecoMuon
MuonSeedGenerator
src
MuonSeedSimpleCleaner.cc
Go to the documentation of this file.
1
#include "
RecoMuon/MuonSeedGenerator/src/MuonSeedSimpleCleaner.h
"
2
3
void
MuonSeedSimpleCleaner::clean
(
TrajectorySeedCollection
&
seeds
) {
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
19
bool
MuonSeedSimpleCleaner::checkPt
(
const
TrajectorySeed
&
seed
)
const
{
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
}
Vector3DBase< float, LocalTag >
counter
Definition:
counter.py:1
TrajectorySeedCollection
std::vector< TrajectorySeed > TrajectorySeedCollection
Definition:
TrajectorySeedCollection.h:6
DiDispStaMuonMonitor_cfi.pt
pt
Definition:
DiDispStaMuonMonitor_cfi.py:39
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
MuonSeedSimpleCleaner.h
DetId
Definition:
DetId.h:17
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition:
DetId.h:48
InitialStep_cff.seeds
seeds
Definition:
InitialStep_cff.py:232
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition:
PixelPluginsPhase0_cfi.py:17
TrajectorySeed
Definition:
TrajectorySeed.h:17
mps_fire.result
result
Definition:
mps_fire.py:303
MuonSeedSimpleCleaner::clean
void clean(TrajectorySeedCollection &seeds) override
Definition:
MuonSeedSimpleCleaner.cc:3
MuonSeedSimpleCleaner::checkPt
bool checkPt(const TrajectorySeed &seed) const
Definition:
MuonSeedSimpleCleaner.cc:19
SurveyInfoScenario_cff.seed
seed
Definition:
SurveyInfoScenario_cff.py:295
Generated for CMSSW Reference Manual by
1.8.16