25 Suffix(iConfig.getParameter<
std::
string>(
"Suffix")),
27 produces<std::vector<int>>(
Prefix +
"clusterIdx" +
Suffix);
28 produces<std::vector<int>>(
Prefix +
"onTrkClusterIdx" +
Suffix);
29 produces<std::vector<int>>(
Prefix +
"onTrkClustersBegin" +
Suffix);
30 produces<std::vector<int>>(
Prefix +
"onTrkClustersEnd" +
Suffix);
31 produces<std::vector<int>>(
Prefix +
"trackindex" +
Suffix);
33 produces<std::vector<unsigned int>>(
Prefix +
"trackmulti" +
Suffix);
34 produces<std::vector<float>>(
Prefix +
"localtheta" +
Suffix);
35 produces<std::vector<float>>(
Prefix +
"localphi" +
Suffix);
36 produces<std::vector<float>>(
Prefix +
"localpitch" +
Suffix);
37 produces<std::vector<float>>(
Prefix +
"localx" +
Suffix);
38 produces<std::vector<float>>(
Prefix +
"localy" +
Suffix);
39 produces<std::vector<float>>(
Prefix +
"localz" +
Suffix);
41 produces<std::vector<float>>(
Prefix +
"globaltheta" +
Suffix);
42 produces<std::vector<float>>(
Prefix +
"globalphi" +
Suffix);
43 produces<std::vector<float>>(
Prefix +
"globalx" +
Suffix);
44 produces<std::vector<float>>(
Prefix +
"globaly" +
Suffix);
45 produces<std::vector<float>>(
Prefix +
"globalz" +
Suffix);
46 produces<std::vector<float>>(
Prefix +
"insidistance" +
Suffix);
47 produces<std::vector<float>>(
Prefix +
"covered" +
Suffix);
48 produces<std::vector<float>>(
Prefix +
"projwidth" +
Suffix);
51 produces<std::vector<float>>(
Prefix +
"rhlocalx" +
Suffix);
52 produces<std::vector<float>>(
Prefix +
"rhlocaly" +
Suffix);
53 produces<std::vector<float>>(
Prefix +
"rhlocalxerr" +
Suffix);
54 produces<std::vector<float>>(
Prefix +
"rhlocalyerr" +
Suffix);
55 produces<std::vector<float>>(
Prefix +
"rhglobalx" +
Suffix);
56 produces<std::vector<float>>(
Prefix +
"rhglobaly" +
Suffix);
57 produces<std::vector<float>>(
Prefix +
"rhglobalz" +
Suffix);
58 produces<std::vector<float>>(
Prefix +
"rhstrip" +
Suffix);
59 produces<std::vector<float>>(
Prefix +
"rhmerr" +
Suffix);
61 produces<std::vector<float>>(
Prefix +
"ubstrip" +
Suffix);
62 produces<std::vector<float>>(
Prefix +
"ubmerr" +
Suffix);
64 produces<std::vector<float>>(
Prefix +
"driftx" +
Suffix);
65 produces<std::vector<float>>(
Prefix +
"drifty" +
Suffix);
66 produces<std::vector<float>>(
Prefix +
"driftz" +
Suffix);
67 produces<std::vector<float>>(
Prefix +
"globalZofunitlocalY" +
Suffix);
75 int size = clustermap.size();
78 auto clusterIdx = std::make_unique<std::vector<int>>();
79 auto onTrkClusterIdx =
80 std::make_unique<std::vector<int>>(
size, -1);
81 auto onTrkClustersBegin = std::make_unique<std::vector<int>>(
tracks->size(), -1);
82 auto onTrkClustersEnd = std::make_unique<std::vector<int>>(
tracks->size(), -1);
83 auto trackindex = std::make_unique<std::vector<int>>();
84 clusterIdx->reserve(
size);
85 trackindex->reserve(
size);
87 auto trackmulti = std::make_unique<std::vector<unsigned int>>();
88 trackmulti->reserve(
size);
89 auto localtheta = std::make_unique<std::vector<float>>();
90 localtheta->reserve(
size);
91 auto localphi = std::make_unique<std::vector<float>>();
92 localphi->reserve(
size);
93 auto localpitch = std::make_unique<std::vector<float>>();
94 localpitch->reserve(
size);
95 auto localx = std::make_unique<std::vector<float>>();
96 localx->reserve(
size);
97 auto localy = std::make_unique<std::vector<float>>();
98 localy->reserve(
size);
99 auto localz = std::make_unique<std::vector<float>>();
100 localz->reserve(
size);
101 auto strip = std::make_unique<std::vector<float>>();
103 auto globaltheta = std::make_unique<std::vector<float>>();
104 globaltheta->reserve(
size);
105 auto globalphi = std::make_unique<std::vector<float>>();
106 globalphi->reserve(
size);
107 auto globalx = std::make_unique<std::vector<float>>();
108 globalx->reserve(
size);
109 auto globaly = std::make_unique<std::vector<float>>();
110 globaly->reserve(
size);
111 auto globalz = std::make_unique<std::vector<float>>();
112 globalz->reserve(
size);
113 auto insidistance = std::make_unique<std::vector<float>>();
114 insidistance->reserve(
size);
115 auto projwidth = std::make_unique<std::vector<float>>();
116 projwidth->reserve(
size);
117 auto BdotY = std::make_unique<std::vector<float>>();
118 BdotY->reserve(
size);
119 auto covered = std::make_unique<std::vector<float>>();
120 covered->reserve(
size);
121 auto rhlocalx = std::make_unique<std::vector<float>>();
122 rhlocalx->reserve(
size);
123 auto rhlocaly = std::make_unique<std::vector<float>>();
124 rhlocaly->reserve(
size);
125 auto rhlocalxerr = std::make_unique<std::vector<float>>();
126 rhlocalxerr->reserve(
size);
127 auto rhlocalyerr = std::make_unique<std::vector<float>>();
128 rhlocalyerr->reserve(
size);
129 auto rhglobalx = std::make_unique<std::vector<float>>();
130 rhglobalx->reserve(
size);
131 auto rhglobaly = std::make_unique<std::vector<float>>();
132 rhglobaly->reserve(
size);
133 auto rhglobalz = std::make_unique<std::vector<float>>();
134 rhglobalz->reserve(
size);
135 auto rhstrip = std::make_unique<std::vector<float>>();
136 rhstrip->reserve(
size);
137 auto rhmerr = std::make_unique<std::vector<float>>();
138 rhmerr->reserve(
size);
139 auto ubstrip = std::make_unique<std::vector<float>>();
140 ubstrip->reserve(
size);
141 auto ubmerr = std::make_unique<std::vector<float>>();
142 ubmerr->reserve(
size);
143 auto driftx = std::make_unique<std::vector<float>>();
144 driftx->reserve(
size);
145 auto drifty = std::make_unique<std::vector<float>>();
146 drifty->reserve(
size);
147 auto driftz = std::make_unique<std::vector<float>>();
148 driftz->reserve(
size);
149 auto globalZofunitlocalY = std::make_unique<std::vector<float>>();
150 globalZofunitlocalY->reserve(
size);
161 size_t ontrk_cluster_idx = 0;
162 std::map<size_t, std::vector<size_t>>
mapping;
170 size_t trk_strt_idx = ontrk_cluster_idx;
175 combiner(measurement.forwardPredictedState(), measurement.backwardPredictedState());
182 for (
unsigned h = 0;
h < 2;
h++) {
184 if (!matchedhit &&
h == 1)
186 else if (matchedhit &&
h == 0)
188 else if (matchedhit &&
h == 1)
197 shallow::CLUSTERMAP::const_iterator cluster =
198 clustermap.find(std::make_pair(
hit->geographicalId().rawId(), cluster_ptr->
firstStrip()));
199 if (cluster == clustermap.end())
200 throw cms::Exception(
"Logic Error") <<
"Cluster not found: this could be a configuration error" << std::endl;
202 unsigned i = cluster->second;
205 auto already_visited =
mapping.find(
i);
206 int nassociations = 1;
207 if (already_visited !=
mapping.end()) {
208 nassociations += already_visited->second.size();
209 for (
size_t idx : already_visited->second) {
210 trackmulti->at(
idx)++;
212 already_visited->second.push_back(ontrk_cluster_idx);
214 std::vector<size_t>
single = {ontrk_cluster_idx};
219 dynamic_cast<const StripGeomDetUnit*>(theTrackerGeometry->
idToDet(
hit->geographicalId()));
222 if (nassociations == 1)
223 onTrkClusterIdx->at(
i) = ontrk_cluster_idx;
224 clusterIdx->push_back(
i);
225 trackmulti->push_back(nassociations);
226 trackindex->push_back(trk_idx);
229 localpitch->push_back(
240 insidistance->push_back(1. / fabs(
cos(localtheta->at(ontrk_cluster_idx))));
241 projwidth->push_back(
tan(localtheta->at(ontrk_cluster_idx)) *
cos(localphi->at(ontrk_cluster_idx)));
243 covered->push_back(
drift.
z() / localpitch->at(ontrk_cluster_idx) *
244 fabs(projwidth->at(ontrk_cluster_idx) -
drift.
x() /
drift.
z()));
245 rhlocalx->push_back(
hit->localPosition().
x());
246 rhlocaly->push_back(
hit->localPosition().
y());
247 rhlocalxerr->push_back(
sqrt(
hit->localPositionError().xx()));
248 rhlocalyerr->push_back(
sqrt(
hit->localPositionError().yy()));
249 rhglobalx->push_back(theStripDet->
toGlobal(
hit->localPosition()).
x());
250 rhglobaly->push_back(theStripDet->
toGlobal(
hit->localPosition()).
y());
251 rhglobalz->push_back(theStripDet->
toGlobal(
hit->localPosition()).
z());
253 rhmerr->push_back(
sqrt(
259 driftx->push_back(
drift.
x());
260 drifty->push_back(
drift.
y());
261 driftz->push_back(
drift.
z());
268 onTrkClustersBegin->at(trk_idx) = trk_strt_idx;
269 onTrkClustersEnd->at(trk_idx) = ontrk_cluster_idx;