43 for (
i1 =
r1.first,
i2 =
r2.first, nHits = 0;
i1 !=
r1.second; ++
i1, ++
i2, ++nHits) {
44 if (!
i1->isValid() || !
i2->isValid())
46 if (
i1->geographicalId() !=
i2->geographicalId())
48 if (!(
i1->localPosition() ==
i2->localPosition()))
67 if ((
seed.caloCluster().key() ==
res.caloCluster().key()) && (
seed.hitsMask() ==
res.hitsMask()) &&
73 seed.setNegAttributes(
res.dRZNeg(1),
res.dPhiNeg(1),
res.dRZNeg(0),
res.dPhiNeg(0));
77 if (
res.dRZPos(1) !=
seed.dRZPos(1)) {
79 <<
"this similar old seed already has another dRz2Pos"
80 <<
"\nold seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
res.hitsMask() <<
"/"
81 <<
res.dRZNeg(1) <<
"/" <<
res.dPhiNeg(1) <<
"/" <<
res.dRZPos(1) <<
"/" <<
res.dPhiPos(1)
82 <<
"\nnew seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
seed.hitsMask() <<
"/"
83 <<
seed.dRZNeg(1) <<
"/" <<
seed.dPhiNeg(1) <<
"/" <<
seed.dRZPos(1) <<
"/" <<
seed.dPhiPos(1);
91 seed.setPosAttributes(
res.dRZPos(1),
res.dPhiPos(1),
res.dRZPos(0),
res.dPhiPos(0));
95 if (
res.dRZNeg(1) !=
seed.dRZNeg(1)) {
97 <<
"this old seed already has another dRz2"
98 <<
"\nold seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
res.hitsMask() <<
"/"
99 <<
res.dRZNeg(1) <<
"/" <<
res.dPhiNeg(1) <<
"/" <<
res.dRZPos(1) <<
"/" <<
res.dPhiPos(1)
100 <<
"\nnew seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
seed.hitsMask() <<
"/"
101 <<
seed.dRZNeg(1) <<
"/" <<
seed.dPhiNeg(1) <<
"/" <<
seed.dRZPos(1) <<
"/" <<
seed.dPhiPos(1);
112 void seedsFromTrajectorySeeds(
const std::vector<SeedWithInfo> &
pixelSeeds,
117 LogDebug(
"ElectronSeedGenerator") <<
"Compatible " << (positron ?
"positron" :
"electron") <<
" seeds found.";
120 std::vector<SeedWithInfo>::const_iterator
s;
123 seed.setCaloCluster(cluster);
124 seed.initTwoHitSeed(
s->hitsMask);
132 : dynamicPhiRoad_(
pset.getParameter<
bool>(
"dynamicPhiRoad")),
133 verticesTag_(ts.token_vtx),
134 beamSpotTag_(ts.token_bs),
135 lowPtThresh_(
pset.getParameter<double>(
"LowPtThreshold")),
136 highPtThresh_(
pset.getParameter<double>(
"HighPtThreshold")),
137 nSigmasDeltaZ1_(
pset.getParameter<double>(
"nSigmasDeltaZ1")),
138 deltaZ1WithVertex_(
pset.getParameter<double>(
"deltaZ1WithVertex")),
139 sizeWindowENeg_(
pset.getParameter<double>(
"SizeWindowENeg")),
140 deltaPhi1Low_(
pset.getParameter<double>(
"DeltaPhi1Low")),
141 deltaPhi1High_(
pset.getParameter<double>(
"DeltaPhi1High")),
143 dPhi1Coef2_(dynamicPhiRoad_ ? (deltaPhi1Low_ - deltaPhi1High_) / (1. / lowPtThresh_ - 1. / highPtThresh_) : 0.),
144 dPhi1Coef1_(dynamicPhiRoad_ ? deltaPhi1Low_ - dPhi1Coef2_ / lowPtThresh_ : 0.),
145 propagator_(nullptr),
147 useRecoVertex_(
pset.getParameter<
bool>(
"useRecoVertex")),
149 deltaPhi2B_(
pset.getParameter<double>(
"DeltaPhi2B")),
150 deltaPhi2F_(
pset.getParameter<double>(
"DeltaPhi2F")),
151 phiMin2B_(-
pset.getParameter<double>(
"PhiMax2B")),
152 phiMin2F_(-
pset.getParameter<double>(
"PhiMax2F")),
153 phiMax2B_(
pset.getParameter<double>(
"PhiMax2B")),
154 phiMax2F_(
pset.getParameter<double>(
"PhiMax2F")),
155 electronMatcher_(
pset.getParameter<double>(
"ePhiMin1"),
156 pset.getParameter<double>(
"ePhiMax1"),
161 -
pset.getParameter<double>(
"z2MaxB"),
162 pset.getParameter<double>(
"z2MaxB"),
163 -
pset.getParameter<double>(
"r2MaxF"),
164 pset.getParameter<double>(
"r2MaxF"),
165 -
pset.getParameter<double>(
"rMaxI"),
166 pset.getParameter<double>(
"rMaxI"),
168 positronMatcher_(
pset.getParameter<double>(
"pPhiMin1"),
169 pset.getParameter<double>(
"pPhiMax1"),
174 -
pset.getParameter<double>(
"z2MaxB"),
175 pset.getParameter<double>(
"z2MaxB"),
176 -
pset.getParameter<double>(
"r2MaxF"),
177 pset.getParameter<double>(
"r2MaxF"),
178 -
pset.getParameter<double>(
"rMaxI"),
179 pset.getParameter<double>(
"rMaxI"),
184 bool tochange =
false;
208 const std::vector<const TrajectorySeedCollection *> &seedsV,
216 std::vector<reco::Vertex>
const *
vertices =
nullptr;
220 for (
unsigned int i = 0;
i < sclRefs.
size(); ++
i) {
222 LogDebug(
"ElectronSeedGenerator") <<
"new cluster, calling seedsFromThisCluster";
226 LogDebug(
"ElectronSeedGenerator") <<
": For event " <<
e.id();
227 LogDebug(
"ElectronSeedGenerator") <<
"Nr of superclusters after filter: " << sclRefs.
size()
228 <<
", no. of ElectronSeeds found = " <<
out.size();
233 std::vector<reco::Vertex>
const *
vertices,
235 float clusterEnergy = seedCluster->energy();
236 GlobalPoint clusterPos(seedCluster->position().x(), seedCluster->position().y(), seedCluster->position().z());
270 double sigmaZ0Error =
beamSpot.sigmaZ0Error();
283 seedsFromTrajectorySeeds(elePixelSeeds, caloCluster,
out,
false);
286 seedsFromTrajectorySeeds(posPixelSeeds, caloCluster,
out,
true);
292 double myZmin1, myZmax1;
293 if (vertexPos.z() ==
beamSpot.position().z()) {
295 double sigmaZ0Error =
beamSpot.sigmaZ0Error();
309 seedsFromTrajectorySeeds(elePixelSeeds, caloCluster,
out,
false);
312 seedsFromTrajectorySeeds(posPixelSeeds, caloCluster,
out,
true);