30 Suffix(iConfig.getParameter<
std::
string>(
"Suffix")),
32 produces<std::vector<int>>(
Prefix +
"clusterIdx" +
Suffix);
33 produces<std::vector<int>>(
Prefix +
"onTrkClusterIdx" +
Suffix);
34 produces<std::vector<int>>(
Prefix +
"onTrkClustersBegin" +
Suffix);
35 produces<std::vector<int>>(
Prefix +
"onTrkClustersEnd" +
Suffix);
36 produces<std::vector<int>>(
Prefix +
"trackindex" +
Suffix);
38 produces<std::vector<unsigned int>>(
Prefix +
"trackmulti" +
Suffix);
39 produces<std::vector<float>>(
Prefix +
"localtheta" +
Suffix);
40 produces<std::vector<float>>(
Prefix +
"localphi" +
Suffix);
41 produces<std::vector<float>>(
Prefix +
"localpitch" +
Suffix);
42 produces<std::vector<float>>(
Prefix +
"localx" +
Suffix);
43 produces<std::vector<float>>(
Prefix +
"localy" +
Suffix);
44 produces<std::vector<float>>(
Prefix +
"localz" +
Suffix);
46 produces<std::vector<float>>(
Prefix +
"globaltheta" +
Suffix);
47 produces<std::vector<float>>(
Prefix +
"globalphi" +
Suffix);
48 produces<std::vector<float>>(
Prefix +
"globalx" +
Suffix);
49 produces<std::vector<float>>(
Prefix +
"globaly" +
Suffix);
50 produces<std::vector<float>>(
Prefix +
"globalz" +
Suffix);
51 produces<std::vector<float>>(
Prefix +
"insidistance" +
Suffix);
52 produces<std::vector<float>>(
Prefix +
"covered" +
Suffix);
53 produces<std::vector<float>>(
Prefix +
"projwidth" +
Suffix);
56 produces<std::vector<float>>(
Prefix +
"rhlocalx" +
Suffix);
57 produces<std::vector<float>>(
Prefix +
"rhlocaly" +
Suffix);
58 produces<std::vector<float>>(
Prefix +
"rhlocalxerr" +
Suffix);
59 produces<std::vector<float>>(
Prefix +
"rhlocalyerr" +
Suffix);
60 produces<std::vector<float>>(
Prefix +
"rhglobalx" +
Suffix);
61 produces<std::vector<float>>(
Prefix +
"rhglobaly" +
Suffix);
62 produces<std::vector<float>>(
Prefix +
"rhglobalz" +
Suffix);
63 produces<std::vector<float>>(
Prefix +
"rhstrip" +
Suffix);
64 produces<std::vector<float>>(
Prefix +
"rhmerr" +
Suffix);
66 produces<std::vector<float>>(
Prefix +
"ubstrip" +
Suffix);
67 produces<std::vector<float>>(
Prefix +
"ubmerr" +
Suffix);
69 produces<std::vector<float>>(
Prefix +
"driftx" +
Suffix);
70 produces<std::vector<float>>(
Prefix +
"drifty" +
Suffix);
71 produces<std::vector<float>>(
Prefix +
"driftz" +
Suffix);
72 produces<std::vector<float>>(
Prefix +
"globalZofunitlocalY" +
Suffix);
80 int size = clustermap.size();
83 auto clusterIdx = std::make_unique<std::vector<int>>();
84 auto onTrkClusterIdx =
85 std::make_unique<std::vector<int>>(
size, -1);
86 auto onTrkClustersBegin = std::make_unique<std::vector<int>>(
tracks->size(), -1);
87 auto onTrkClustersEnd = std::make_unique<std::vector<int>>(
tracks->size(), -1);
88 auto trackindex = std::make_unique<std::vector<int>>();
89 clusterIdx->reserve(
size);
90 trackindex->reserve(
size);
92 auto trackmulti = std::make_unique<std::vector<unsigned int>>();
93 trackmulti->reserve(
size);
94 auto localtheta = std::make_unique<std::vector<float>>();
95 localtheta->reserve(
size);
96 auto localphi = std::make_unique<std::vector<float>>();
97 localphi->reserve(
size);
98 auto localpitch = std::make_unique<std::vector<float>>();
99 localpitch->reserve(
size);
100 auto localx = std::make_unique<std::vector<float>>();
101 localx->reserve(
size);
102 auto localy = std::make_unique<std::vector<float>>();
103 localy->reserve(
size);
104 auto localz = std::make_unique<std::vector<float>>();
105 localz->reserve(
size);
106 auto strip = std::make_unique<std::vector<float>>();
108 auto globaltheta = std::make_unique<std::vector<float>>();
109 globaltheta->reserve(
size);
110 auto globalphi = std::make_unique<std::vector<float>>();
111 globalphi->reserve(
size);
112 auto globalx = std::make_unique<std::vector<float>>();
113 globalx->reserve(
size);
114 auto globaly = std::make_unique<std::vector<float>>();
115 globaly->reserve(
size);
116 auto globalz = std::make_unique<std::vector<float>>();
117 globalz->reserve(
size);
118 auto insidistance = std::make_unique<std::vector<float>>();
119 insidistance->reserve(
size);
120 auto projwidth = std::make_unique<std::vector<float>>();
121 projwidth->reserve(
size);
122 auto BdotY = std::make_unique<std::vector<float>>();
123 BdotY->reserve(
size);
124 auto covered = std::make_unique<std::vector<float>>();
125 covered->reserve(
size);
126 auto rhlocalx = std::make_unique<std::vector<float>>();
127 rhlocalx->reserve(
size);
128 auto rhlocaly = std::make_unique<std::vector<float>>();
129 rhlocaly->reserve(
size);
130 auto rhlocalxerr = std::make_unique<std::vector<float>>();
131 rhlocalxerr->reserve(
size);
132 auto rhlocalyerr = std::make_unique<std::vector<float>>();
133 rhlocalyerr->reserve(
size);
134 auto rhglobalx = std::make_unique<std::vector<float>>();
135 rhglobalx->reserve(
size);
136 auto rhglobaly = std::make_unique<std::vector<float>>();
137 rhglobaly->reserve(
size);
138 auto rhglobalz = std::make_unique<std::vector<float>>();
139 rhglobalz->reserve(
size);
140 auto rhstrip = std::make_unique<std::vector<float>>();
141 rhstrip->reserve(
size);
142 auto rhmerr = std::make_unique<std::vector<float>>();
143 rhmerr->reserve(
size);
144 auto ubstrip = std::make_unique<std::vector<float>>();
145 ubstrip->reserve(
size);
146 auto ubmerr = std::make_unique<std::vector<float>>();
147 ubmerr->reserve(
size);
148 auto driftx = std::make_unique<std::vector<float>>();
149 driftx->reserve(
size);
150 auto drifty = std::make_unique<std::vector<float>>();
151 drifty->reserve(
size);
152 auto driftz = std::make_unique<std::vector<float>>();
153 driftz->reserve(
size);
154 auto globalZofunitlocalY = std::make_unique<std::vector<float>>();
155 globalZofunitlocalY->reserve(
size);
169 size_t ontrk_cluster_idx = 0;
170 std::map<size_t, std::vector<size_t>>
mapping;
178 size_t trk_strt_idx = ontrk_cluster_idx;
183 combiner(measurement.forwardPredictedState(), measurement.backwardPredictedState());
190 for (
unsigned h = 0;
h < 2;
h++) {
192 if (!matchedhit &&
h == 1)
194 else if (matchedhit &&
h == 0)
196 else if (matchedhit &&
h == 1)
205 shallow::CLUSTERMAP::const_iterator cluster =
206 clustermap.find(std::make_pair(
hit->geographicalId().rawId(), cluster_ptr->
firstStrip()));
207 if (cluster == clustermap.end())
208 throw cms::Exception(
"Logic Error") <<
"Cluster not found: this could be a configuration error" << std::endl;
210 unsigned i = cluster->second;
213 auto already_visited =
mapping.find(
i);
214 int nassociations = 1;
215 if (already_visited !=
mapping.end()) {
216 nassociations += already_visited->second.size();
217 for (
size_t idx : already_visited->second) {
218 trackmulti->at(
idx)++;
220 already_visited->second.push_back(ontrk_cluster_idx);
222 std::vector<size_t>
single = {ontrk_cluster_idx};
227 dynamic_cast<const StripGeomDetUnit*>(theTrackerGeometry->
idToDet(
hit->geographicalId()));
230 if (nassociations == 1)
231 onTrkClusterIdx->at(
i) = ontrk_cluster_idx;
232 clusterIdx->push_back(
i);
233 trackmulti->push_back(nassociations);
234 trackindex->push_back(trk_idx);
237 localpitch->push_back(
248 insidistance->push_back(1. / fabs(
cos(localtheta->at(ontrk_cluster_idx))));
249 projwidth->push_back(
tan(localtheta->at(ontrk_cluster_idx)) *
cos(localphi->at(ontrk_cluster_idx)));
251 covered->push_back(
drift.
z() / localpitch->at(ontrk_cluster_idx) *
252 fabs(projwidth->at(ontrk_cluster_idx) -
drift.
x() /
drift.
z()));
253 rhlocalx->push_back(
hit->localPosition().
x());
254 rhlocaly->push_back(
hit->localPosition().
y());
255 rhlocalxerr->push_back(
sqrt(
hit->localPositionError().xx()));
256 rhlocalyerr->push_back(
sqrt(
hit->localPositionError().yy()));
257 rhglobalx->push_back(theStripDet->
toGlobal(
hit->localPosition()).
x());
258 rhglobaly->push_back(theStripDet->
toGlobal(
hit->localPosition()).
y());
259 rhglobalz->push_back(theStripDet->
toGlobal(
hit->localPosition()).
z());
261 rhmerr->push_back(
sqrt(
267 driftx->push_back(
drift.
x());
268 drifty->push_back(
drift.
y());
269 driftz->push_back(
drift.
z());
276 onTrkClustersBegin->at(trk_idx) = trk_strt_idx;
277 onTrkClustersEnd->at(trk_idx) = ontrk_cluster_idx;