41 if (!
i1->isValid() || !
i2->isValid())
43 if (
i1->geographicalId() !=
i2->geographicalId())
45 if (!(
i1->localPosition() ==
i2->localPosition()))
64 if ((
seed.caloCluster().key() ==
res.caloCluster().key()) && (
seed.hitsMask() ==
res.hitsMask()) &&
70 seed.setNegAttributes(
res.dRZNeg(1),
res.dPhiNeg(1),
res.dRZNeg(0),
res.dPhiNeg(0));
74 if (
res.dRZPos(1) !=
seed.dRZPos(1)) {
76 <<
"this similar old seed already has another dRz2Pos"
77 <<
"\nold seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
res.hitsMask() <<
"/"
78 <<
res.dRZNeg(1) <<
"/" <<
res.dPhiNeg(1) <<
"/" <<
res.dRZPos(1) <<
"/" <<
res.dPhiPos(1)
79 <<
"\nnew seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
seed.hitsMask() <<
"/"
80 <<
seed.dRZNeg(1) <<
"/" <<
seed.dPhiNeg(1) <<
"/" <<
seed.dRZPos(1) <<
"/" <<
seed.dPhiPos(1);
88 seed.setPosAttributes(
res.dRZPos(1),
res.dPhiPos(1),
res.dRZPos(0),
res.dPhiPos(0));
92 if (
res.dRZNeg(1) !=
seed.dRZNeg(1)) {
94 <<
"this old seed already has another dRz2"
95 <<
"\nold seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
res.hitsMask() <<
"/"
96 <<
res.dRZNeg(1) <<
"/" <<
res.dPhiNeg(1) <<
"/" <<
res.dRZPos(1) <<
"/" <<
res.dPhiPos(1)
97 <<
"\nnew seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (
unsigned int)
seed.hitsMask() <<
"/"
98 <<
seed.dRZNeg(1) <<
"/" <<
seed.dPhiNeg(1) <<
"/" <<
seed.dRZPos(1) <<
"/" <<
seed.dPhiPos(1);
109 void seedsFromTrajectorySeeds(
const std::vector<SeedWithInfo> &
pixelSeeds,
114 LogDebug(
"ElectronSeedGenerator") <<
"Compatible " << (positron ?
"positron" :
"electron") <<
" seeds found.";
117 std::vector<SeedWithInfo>::const_iterator
s;
120 seed.setCaloCluster(cluster);
121 seed.initTwoHitSeed(
s->hitsMask);
131 : dynamicPhiRoad_(
pset.getParameter<
bool>(
"dynamicPhiRoad")),
132 verticesTag_(ts.token_vtx),
133 beamSpotTag_(ts.token_bs),
134 magFieldToken_{
cc.esConsumes()},
135 trackerGeometryToken_{
cc.esConsumes()},
136 lowPtThresh_(
pset.getParameter<
double>(
"LowPtThreshold")),
137 highPtThresh_(
pset.getParameter<
double>(
"HighPtThreshold")),
138 nSigmasDeltaZ1_(
pset.getParameter<
double>(
"nSigmasDeltaZ1")),
139 deltaZ1WithVertex_(
pset.getParameter<
double>(
"deltaZ1WithVertex")),
140 sizeWindowENeg_(
pset.getParameter<
double>(
"SizeWindowENeg")),
141 deltaPhi1Low_(
pset.getParameter<
double>(
"DeltaPhi1Low")),
142 deltaPhi1High_(
pset.getParameter<
double>(
"DeltaPhi1High")),
144 dPhi1Coef2_(dynamicPhiRoad_ ? (deltaPhi1Low_ - deltaPhi1High_) / (1. / lowPtThresh_ - 1. / highPtThresh_) : 0.),
145 dPhi1Coef1_(dynamicPhiRoad_ ? deltaPhi1Low_ - dPhi1Coef2_ / lowPtThresh_ : 0.),
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 matcher_(
pset.getParameter<
double>(
"ePhiMin1"),
156 pset.getParameter<
double>(
"ePhiMax1"),
161 pset.getParameter<
double>(
"z2MaxB"),
162 pset.getParameter<
double>(
"r2MaxF"),
163 pset.getParameter<
double>(
"rMaxI"),
174 const std::vector<const TrajectorySeedCollection *> &seedsV,
182 std::vector<reco::Vertex>
const *
vertices =
nullptr;
186 for (
unsigned int i = 0;
i < sclRefs.
size(); ++
i) {
188 LogDebug(
"ElectronSeedGenerator") <<
"new cluster, calling seedsFromThisCluster";
192 LogDebug(
"ElectronSeedGenerator") <<
": For event " <<
e.id();
193 LogDebug(
"ElectronSeedGenerator") <<
"Nr of superclusters after filter: " << sclRefs.
size()
194 <<
", no. of ElectronSeeds found = " <<
out.size();
199 std::vector<reco::Vertex>
const *
vertices,
201 float clusterEnergy = seedCluster->energy();
202 GlobalPoint clusterPos(seedCluster->position().x(), seedCluster->position().y(), seedCluster->position().z());
224 double sigmaZ0Error =
beamSpot.sigmaZ0Error();
236 seedsFromTrajectorySeeds(elePixelSeeds, caloCluster,
out,
false);
239 seedsFromTrajectorySeeds(posPixelSeeds, caloCluster,
out,
true);
245 double myZmin1, myZmax1;
246 if (vertexPos.z() ==
beamSpot.position().z()) {
248 double sigmaZ0Error =
beamSpot.sigmaZ0Error();
261 seedsFromTrajectorySeeds(elePixelSeeds, caloCluster,
out,
false);
264 seedsFromTrajectorySeeds(posPixelSeeds, caloCluster,
out,
true);